#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>

void change(int arr[10], int right)
{
	for (int i = 0; i <= right; i++)
	{
		for (int j = i + 1; j <= right; j++)
			if (arr[i] % 2 == 0)
			{
				if (arr[j] % 2 != 0)
				{
					int temp = arr[i];
					arr[i] = arr[j];
					arr[j] = temp;
					break;
				}
			}
	}
	for (int i = 0; i <= right; i++)
	{
		printf("%d ", arr[i]);
	}
}
int main()
{
	int arr[10] = { 0 };
	for (int i = 0; i < 10; i++)
	{
		scanf("%d", &arr[i]);
	}
	int right = sizeof(arr) / sizeof(int) - 1;
	change(arr, right);
	return 0;
}